<!DOCTYPE html>
<html>
	<head>
		<title>我的订单</title>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
		<link rel="stylesheet" href="../lib/weui.min.css">
		<link rel="stylesheet" href="../css/jquery-weui.css">
		<link rel="stylesheet" href="../css/demos.css">
		<link rel="stylesheet" type="text/css" href="../font/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="css/mymenu.css"/>
	</head>
	<body>
    <!--头部-->
       <div id="mymenu-main">
       	  <div class="mymenu-dingdan"> 订单</div>
       	  <!--//在没有登录时显示的div-->
       	  <div class="mymenu-content" v-if="!type">
       	  	<div>
       	  	     	<img src="img/image_characters.png"/>
       	  	        <p class="mymenu-content-chakan">登陆后查看外卖订单</p>
       	  	        <a class="mymenu-content-denglu" href="../login/index.html">立即登录</a>
       	  	</div>  
       	  	</div>
       	  	<!--//以下为只要登陆后就会显示的div-->
       	  	<div class="mayueloginhou" v-if="type">
       	  		您暂时还没有订单哦，快去进行您的第一次购物吧！
       	  	</div>
       	  <!--//在登录后显示的div     只有在登陆后并且结算后才会显示已经买过的订单-->
       	  <div id="have-menu-main">
       	  	<!--//里边的每一个产品-->
       	  	<div class="have-menu">
       	  	  <div class="have-menu-1"> 
       	  	     <div class="have-menu-1-left">
       	  	     	<img src="../img/0df0da153bb7b04b84910e0e993b3jpeg.jpg"/>
       	  	     </div>
       	  	      <div class="have-menu-1-right">
       	  	     	<p><span class="pinming">重庆鸡公煲 <span class="iconfont icon-more"></span></span><span class="dingdanqingkuang">订单已完成</span></p>
       	  	     	<p class="dingdantime">2017-3-29 20:25</p>
       	  	     </div>
       	  	  </div>
       	  	  <div class="have-menu-2">
       	  	  	<div class="have-menu-1-left">
       	  	     </div>
       	  	      <div class="have-menu-1-right">
       	  	      	<p><span class="have-menu-shuliang">肥牛等8件商品</span>
       	  	      	 <span class="have-menu-jiage">￥11.00</span></p>
       	  	     </div>
       	  	  </div>
       	  	  <div class="have-menu-3"><a class="aginyidan" href="javascript:;">再来一单</a> </div>
       	  	 <!--//每一个产品结束的div-->
       	  </div> 
       	    <!--//里边的每一个产品-->
       	  	<div class="have-menu">
       	  	  <div class="have-menu-1"> 
       	  	     <div class="have-menu-1-left">
       	  	     	<img src="../img/0df0da153bb7b04b84910e0e993b3jpeg.jpg"/>
       	  	     </div>
       	  	      <div class="have-menu-1-right">
       	  	     	<p><span class="pinming">重庆鸡公煲 <span class="iconfont icon-more"></span></span><span class="dingdanqingkuang">订单已完成</span></p>
       	  	     	<p class="dingdantime">2017-3-29 20:25</p>
       	  	     </div>
       	  	  </div>
       	  	  <div class="have-menu-2">
       	  	  	<div class="have-menu-1-left">
       	  	     </div>
       	  	      <div class="have-menu-1-right">
       	  	      	<p><span class="have-menu-shuliang">肥牛等8件商品</span>
       	  	      	 <span class="have-menu-jiage">￥11.00</span></p>
       	  	     </div>
       	  	  </div>
       	  	  <div class="have-menu-3"><a class="aginyidan" href="javascript:;">再来一单</a> </div>
       	  	 <!--//每一个产品结束的div-->
       	  </div> 
       	  <!--//登陆后显示的结束的div-->
       	  </div>
             <!--//底部的固定的菜单-->
       	  		<div class="weui-tabbar">
			<a href="../index/index.html" class="weui-tabbar__item ">
				<div class="weui-tabbar__icon">
					<img src="../images/icon_nav_button.png" alt="">
				</div>
				<p class="weui-tabbar__label">外卖</p>
			</a>
			<a href="../find/find.html" class="weui-tabbar__item">
				<div class="weui-tabbar__icon">
					<img src="../images/icon_nav_msg.png" alt="">
				</div>
				<p class="weui-tabbar__label">发现</p>
			</a>
			<a href="mymenu.html" class="weui-tabbar__item">
				<div class="weui-tabbar__icon">
					<img src="../images/icon_nav_article.png" alt="">
				</div>
				<p class="weui-tabbar__label">订单</p>
			</a>
			<a href="../mine/mine.html" class="weui-tabbar__item weui-bar__item--on">
				<div class="weui-tabbar__icon">
					<img src="../images/icon_nav_cell.png" alt="">
				</div>
				<p class="weui-tabbar__label">我的</p>
			</a>
		</div>
		<!--//总的div的结束标签-->
     </div>
		<script src="../lib/jquery-2.1.4.js"></script>
		<script src="../js/jquery-weui.js"></script>
		<script src="../js/av-min-2.1.2.js"></script>
		<script src="../js/vue.js" type="text/javascript"></script>
		<script type="text/javascript">
			var newnue = new Vue({
				el: "body",
				data: {
					type:false,
				},
				created: function() {
					console.log(this);
					var mythis = this;
					var APP_ID = '9etyUbhi95RBWTaoLBTyW5HP-gzGzoHsz';
					var APP_KEY = '6IkehXVEvUELlpo1SAf1c8PR';
					AV.init({
						appId: APP_ID,
						appKey: APP_KEY
					});
					var currentUser = AV.User.current();
					//判断用户是否登录
					if(currentUser) {
						//若登录跳到商家订单页面
						console.log("该用户已登录");
				         mythis.type = true;
					} else {
						//若没有就跳到登录注册页面
						console.log("该用户没有登录");
						mythis.type = false;
					}
				},
				methods: {
					logout: function() {
						//退出后回清空密码数据，并且会调到登录界面
						AV.User.logOut();
						// 现在的 currentUser 是 null 了
						var currentUser = AV.User.current();
						location.href = "../login/index.html";
					}
				}

			})
		</script>	
		
	</body>

</html>
